package com.my.chapter9;

public class practice15 {
    static void A(P15A a){
        a.A();
    }
    static void B(P15B b){
        b.B();
    }
    static void C(P15C c){
        c.C();
    }
    static void D(P15D d){
        d.D();
    }
    static void E(P15E e){
        e.E();
    }

    public static void main(String[] args) {
        ApplyP15 p = new ApplyP15();
        A(p);
        B(p);
        C(p);
        D(p);
        E(p);
    }
}

interface P15A{
    void A();
}

interface P15B{
    void B();
}

interface P15C{
    void C();
}

interface P15D extends P15A,P15B,P15C{
    void D();
}

abstract class P15E{
    abstract void E();
}

class ApplyP15 extends P15E implements P15D{

    @Override
    public void A() {
        System.out.println("A()");
    }

    @Override
    public void B() {
        System.out.println("B()");
    }

    @Override
    public void C() {
        System.out.println("C()");
    }

    @Override
    public void D() {
        System.out.println("D()");
    }

    @Override
    void E() {
        System.out.println("E()");
    }
}
